import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooCustomerLevelController } from '../../../controllers';
const uctoocustomerLevelRouter = new Router();
const customerLevelController = new uctooCustomerLevelController();

uctoocustomerLevelRouter.post('/add', requireUser, customerLevelController.add);
uctoocustomerLevelRouter.post('/edit', requireUser, rowLevelPermission('uctoo/customer_level'), customerLevelController.edit);
uctoocustomerLevelRouter.post('/del', requireUser, rowLevelPermission('uctoo/customer_level'), customerLevelController.delete);

//For getting customerLevel with permission control
uctoocustomerLevelRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/customer_level'), customerLevelController.getSingle);
uctoocustomerLevelRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/customer_level'), customerLevelController.getMany);
uctoocustomerLevelRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/customer_level'), customerLevelController.getMany);

//#endregion AutoCreateCode
export default uctoocustomerLevelRouter;
